<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>RealHouseManagement</title>
        <script src="Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
        <script src="Scripts/jquery-ui-1.8.20.custom.min.js" type="text/javascript"></script>
        <script src="Scripts/jquery.formLabels1.0.js" type="text/javascript"></script>
		 <script src="Scripts/json2.js" type="text/javascript"></script>
        <script type="text/javascript">
            jQuery(function(){
                $.fn.formLabels();
              
			  
			  
			  
			  
			  
            $("form").submit(function(){
                var UserName=$("#UserName").attr("value");
                var PassWd=$("#password").attr("value");
                $.post("/RealHouse/AdminLogin",{"UserName":UserName,"PassWd":PassWd},function(Result){ 
                            
                    var Result=Result;
                    if(Result==1)
                    {
                     	window.location.href="/RealHouse/admin/index.html"                   
                    }
                    else
                    {
                        $("#h3").html("LoginFailed");
                    }
                })
                return false;
            });
        });
                
        </script>
        <link href="CSS/Admin.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
            <br>
        <div id="cont">
            <form method="post" action="" id="login">
                <h3 id="h3">Admin_Login</h3>
                <div class="field"><input type="username" name="UserName" title="UserName" id="UserName" /></div>
                <div class="field"><input type="password" name="password" title="Password" id="password" /></div>
                <div class="submit"><button type="submit">Login</button></div>
            </form>
        </div>

       
 </body>
  </html>
